/**
* @file		Regime.ixx
* @brief	一个势力
*
*
* @version	1.0
* @author	lveyou
* @date		22-07-31
*
* @note		
*/
export module Regime;

import DND;
import DrawFlag;
import DefVar;

//! 表示一个势力
export class Regime
{
public:
	struct SL
	{
		size_t _uid;//唯一id
	};

	struct UI
	{
		DrawFlag _flagCapital;//首都旗子
		DrawFlag _flagUI;//UI界面旗子
	};

	Regime(size_t uid)
	{
		_sl._uid = uid;

		_ui._flagUI.Set("蜀", ColorDef::GREEN);
	}
	
	//根据索引设置位置
	void RefreshUI(size_t index)
	{
		Vector2 size = toVector2(g_system->GetWindowSize());
		real sx = size[0] - 460;
		real sy = 0 + 30;
		size_t x = index % 7;
		size_t y = index / 7;
		_ui._flagUI.GetCoor()->SetPosition({ sx + x * 70.0, sy + y * 64.0 });
	}

	void RenderUI()
	{
		_ui._flagUI.Render();
	}

	bool IsPickup()
	{
		return _ui._flagUI.IsPickup();
	}
private:
	SL _sl;
	UI _ui;
	
};
module: private;

